package com.hnl.to.wrapper;

import com.hnl.to.Talent;
import com.hnl.util.DAOHelperUtil;
import com.hnl.util.FormatUtil;

public class TalentWrapper extends Talent {
	private String modifiedUserIDText;
	private String industry1Text;
	private String GUIBirdayText;
	private String GUIExpertise;
	private String GUIComEmail;

	public TalentWrapper(Talent talent) {
		super(talent);
	}
	@Deprecated
	public String getGUIExpertise() {
		String subStr = null;
		if (getExpertise() != null) {
			if (getExpertise().length() > 40) {
				subStr = getExpertise().substring(0, 40) + "...";
			} else {
				subStr = this.getExpertise();
			}
		}
		setGUIExpertise(subStr);
		return subStr;
	}

	@Deprecated
	public String getGUIComEmail() {
		String subStr = null;
		if (getComMail() != null) {
			if (getComMail().length() > 10) {
				subStr = getComMail().substring(0, 10) + "...";
			} else {
				subStr = this.getComMail();
			}
		}
		setGUIComEmail(subStr);
		return subStr;
	}
	@Deprecated
	public void setGUIExpertise(String gUIExpertise) {
		GUIExpertise = gUIExpertise;
	}

	@Deprecated
	public void setGUIComEmail(String gUIComEmail) {
		GUIComEmail = gUIComEmail;
	}

	public String getModifiedUserIDText() {
		setModifiedUserIDText(DAOHelperUtil.getUserTextByID(getModifyUser()));
		return modifiedUserIDText;
	}

	public void setModifiedUserIDText(String modifiedUserIDText) {
		this.modifiedUserIDText = modifiedUserIDText;
	}

	public String getBirthdayFormat() {
		String temp = "";
		if (getBirthdate() != null) {
			temp = FormatUtil.getUSDate(getBirthdate());
		}
		setBirthdayFormat(temp);
		return temp;
	}

	public void setBirthdayFormat(String BDay) {
		this.GUIBirdayText = BDay;
	}

	public String getIndustry1Text() {
		String temp = "";
		if (getIndustry1() == 1) {
			temp = "N/A";
		} else {
			temp = DAOHelperUtil.getMiscTextByID(getIndustry1());
		}
		setIndustry1Text(temp);
		return temp;
	}

	public void setIndustry1Text(String industry1Text) {
		this.industry1Text = industry1Text;
	}

}
